<div id="home-dinos-algo">
    <a id="open-home-modal" href="#" class="eModal-1">Dinos algo</a>  
</div>

<div id="popup-dinos-algo">
    <a id="open-home-modal" href="#" class="eModal-1">Dinos algo</a>  
</div>
<div id="background-dinos-algo">
    <a id="open-home-modal" href="#" class="eModal-1">Dinos algo</a>  
</div>

<div id="dialog-inhala">
    Inhala  
</div>


<div id="home-botones">
    <div class="one_third">
        <div class="button button-que-es-yoga" id="home-first-button">
            <a id="home-first-button-link" href="#"></a>
        </div>
        
    </div>
    <div class="one_third">
        <div class="button button-primera-semana" id="home-second-button">
            <a id="home-second-button-link" href="#"></a>
        </div>
    </div>
    <div class="one_third_last">
        <div class="button button-visitanos" id="home-third-button">
            <a id="home-third-button-link" href="#"></a>
        </div>
    </div>
</div>


<div id="home-posts">
    <div class="two_thirds">
        <h3>Desde el Blog</h3>
        <?php 
            $my_query = new WP_Query( "cat=5&paged=1&posts_per_page=3&order=desc&orderby=date" );
            if ( $my_query->have_posts() ) { 
                while ( $my_query->have_posts() ) { 
                    $my_query->the_post();
        ?>
                    <div class="singe_post">   
                        <h4><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>
                        <p class="post_info">Publicado el <span class="pub_date"><?php the_time("d/m/y"); ?></span> en <span class="category"><?php the_category(", ","single"); ?></span><span class="num_comment"><?php echo comments_number("0 comentarios","1 comentario","% comentarios"); ?></span></p>
                        <div class="post_excerpt"><?php echo get_the_excerpt(); ?> <a class="view_more" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Leer m&aacute;s »</a></div>
                    </div>
        <?php   }
            }else {
                echo "<div>no posts</div>";
            }
            wp_reset_postdata();
        ?>
        <div class="view_more_link">
            <a class="small_button" href="<?php bloginfo('url'); ?>/category/blog" title="Blog"><span>Ir al blog »</span></a>
        </div>
    </div>
    <div class="one_third_last">
        <h3>Pr&oacute;ximos Eventos</h3>
        <?php
			$query_parameters = array(
				'cat' => 13,
				'paged' => 1,
				'posts_per_page' => 4,
				'order' => 'desc',
				'orderby' => 'date',
				'post_status' => array('publish', 'future')    
			);
            $my_query = new WP_Query($query_parameters);
            if ( $my_query->have_posts() ) { 
                while ( $my_query->have_posts() ) { 
                    $my_query->the_post();
        ?>
                    <div class="singe_post">   
                        <h4><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>
                        <p class="post_info">El <?php the_time("d/m/y"); ?> a las <?php the_time("h:i A"); ?> </p>
                    </div>

        <?php   }
            }else {
                echo "<div>no posts</div>";
            }
            wp_reset_postdata();
        ?>
        <div class="view_more_link">
            <a class="small_button" href="http://bikramyoga.pe/wp/category/eventos/" title="Eventos"><span>Ver eventos »</span></a>
        </div>
    </div>
</div>


<div id="blog-sidebar">
    <h4>Categor&iacute;as</h4>
    <ul>
        <?php 
            $categories = get_categories('child_of=5'); 
            foreach ($categories as $category) {
        ?>
            <li><a href="<?php bloginfo('url'); ?>/category/blog/<?php echo $category->slug; ?>"><?php echo $category->cat_name; ?></a></li> 
        <?php } ?>
    </ul>
</div>


<div id="pagina-interior-lateral">
<h4>P&aacute;ginas</h4>
<ul>
    <?php 
        $currentPost = get_post();
        //$parent = $currentPost->post_parent;
        if ($currentPost->post_parent)	{
            $ancestors=get_post_ancestors($currentPost->ID);
            $root=count($ancestors)-1;
            $parent = $ancestors[$root];
        } else {
            $parent = $post->ID;
        }
        echo "parent: $parent <br/>";
        $pages = get_pages('parent=$parent'); 
        foreach ($pages as $page) {
    ?>
        <li>
            <a href="<?php bloginfo('url'); ?>/<?php echo $page->post_name; ?>">
                <?php echo $page->post_title; ?> (<?php echo $page->ID; ?>) (<?php echo $page->post_parent; ?>) (<?php echo $page->menu_order; ?>)
            </a>
        </li> 
    <?php } ?>
</ul>
-------
<ul class="sidebar_nav">
  <?php
    $currentPost = get_post();
    if ($currentPost->post_parent) {
        $ancestors=get_post_ancestors($currentPost->ID);
        $root=count($ancestors)-1;
        $parent = $ancestors[$root];
    } else {
        $parent = $currentPost->ID;
    }
    wp_list_pages('title_li=&child_of='.$parent.'&sort_column=menu_order'); ?>
</ul>
</div>


<div class="prices_title">
    PRECIOS
</div>
<div class="prices_table prices_table_per_class">
    <div class="title">
        PLANES POR CLASE
    </div>
    <div class="content">
        <div style="background: #cdecff" class="row">
            <a class="description" href="#">1 clase drop-in</a><span class="price">S/. 40</span>
        </div>
        <div style="background: #fbd4b4" class="row">
            <a class="description" href="#">4 clases / 1 mes</a><span class="price">S/. 140</span>
        </div>
        <div style="background: #ffcc01" class="row">
            <a class="description" href="#">8 clases / 1 mes</a><span class="price">S/. 260</span>
        </div>
        <div style="background: #f79647" class="row">
            <a class="description" href="#">12 clases / 2 mes</a><span class="price">S/. 360</span>
        </div>
        <div style="background: #e36d09" class="row">
            <a class="description" href="#">30 clases / 3 mes</a><span class="price">S/. 840</span>
        </div>
    </div>
</div>
<div class="prices_table prices_unlimited">
    <div class="title row">
        PLANES ILIMITADOS
    </div>
    <div class="content">
        <div style="background: #cdecff" class="row">
            <a class="description" href="#">Semana Intro Ilimitada</a><span class="price">S/. 50</span>
        </div>
        <div style="background: #c5d9f2" class="row">
            <a class="description" href="#">1 mes ilimitado</a><span class="price">S/. 350</span>
        </div>
        <div style="background: #e3e3e3" class="row">
            <a class="description" href="#">1 mes ilimitado / Oferta del mes</a><span class="price">S/. 300</span>
        </div>
        <div style="background: #fcd5b4" class="row">
            <a class="description" href="#">3 meses ilimitados</a><span class="price">S/. 900</span>
        </div>
        <div style="background: #ffcc01" class="row">
            <a class="description" href="#">6 meses ilimitados</a><span class="price">S/. 1700</span>
        </div>
        <div style="background: #f79647" class="row">
            <a class="description" href="#">1 año ilimitado</a><span class="price">S/. 3100</span>
        </div>
        <div style="background: #e36d09" class="row">
            <a class="description" href="#">Plan familiar</a><span class="price">S/. 800</span>
        </div>
    </div>
</div>
<div class="prices_discounts">
    <p>Descuentos</p>
    <p>Adulto mayor - 15%</p>
    <p>Estudiantes - 15%</p>
</div>




